  <link rel="stylesheet" href="jqwidgets/styles/jqx.base.css" type="text/css" /> <script type="text/javascript" src="<?=base_url()?>assets/js/scripts/jquery-1.7.2.min.js"></script>
<script src="<?=base_url()?>assets/js/scripts/gettheme.js" type="text/javascript" charset="utf-8"></script>
<script src="<?=base_url()?>assets/js/jqwidgets/jqxcore.js" type="text/javascript" charset="utf-8"></script>
<script src="<?=base_url()?>assets/js/jqwidgets/jqxdata.js" type="text/javascript" charset="utf-8"></script>
<script src="<?=base_url()?>assets/js/jqwidgets/jqxbuttons.js" type="text/javascript" charset="utf-8"></script>
<script src="<?=base_url()?>assets/js/jqwidgets/jqxscrollbar.js" type="text/javascript" charset="utf-8"></script>
<script src="<?=base_url()?>assets/js/jqwidgets/jqxpanel.js" type="text/javascript" charset="utf-8"></script>
<script src="<?=base_url()?>assets/js/jqwidgets/jqxtree.js" type="text/javascript" charset="utf-8"></script>
<link rel="stylesheet" href="<?=base_url()?>assets/js/jqwidgets/styles/jqx.base.css" type="text/css" media="screen,print" title="" charset="utf-8">

<script type="text/javascript">
		$(document).ready(function () {
		$.post("<?= site_url('user/proposal_management/gettree');?>",function(msg){
			alert(msg)
			$('#lp').html(msg)
			var data=msg;
			
			var theme = getTheme();
			var source =
			{
				datatype: "json",
				datafields: [
					{ name: 'id' },
					{ name: 'id_parent' },
					{ name: 'name' }
				],
				id: 'id',
				localdata: data
			};
			var dataAdapter = new $.jqx.dataAdapter(source);
			dataAdapter.dataBind();
			var records = dataAdapter.getRecordsHierarchy('id', 'id_parent', 'items', [{ name: 'name', map: 'label'}]);
			$('#trdata').jqxTree({ source: records, width: '300px', theme: theme });
		})
	});
</script>
<div id='content'>
    <p><b>Group List</b></p>
    <div id='trdata'></div>
	<p i="lp"></p>
</div>
